Functional Programming for Imperative Programmers
نویسنده
چکیده
This document introduces functional programming for those that are used to imperative languages, but are trying to come to terms with recursion and other techniques used in functional programming. We use OCaml as the primary language, and we assume that the reader has been introduced to its basic syntax and features. The goal of this document is to help these programmers get more comfortable with functional programming techniques, while addressing the following topics:
منابع مشابه
The Function, and Dysfunction, of Information Sources in Learning Functional Programming
Programmers experienced in using imperative languages can increasingly benefit from also knowing how to use functional languages. However, even if programmers have already mastered general programming constructs such as types and recursion, actually expressing these in a functional language can be challenging. In this paper, we present an observational study investigating what information sourc...
متن کاملOn the Benefits of Combining Functional and Imperative Programming for Multicore Software An Empirical Study Comparing Scala and Java
Recent multi-paradigm programming languages combine functional and imperative programming styles to make software development easier. Given today’s proliferation of multicore processors, parallel programmers are supposed to benefit from this combination, as many difficult problems can be expressed more easily in a functional style while others match an imperative style. However, due to a lack o...
متن کاملFirst-Class Functions in an Imperative World
First-class functions are a hallmark of functional languages, but they are a useful concept in imperative languages, too. Even ANSI C offers a restricted form of first-class functions (in the form of pointers to functions), and several more recent imperative languages, such as Python 3, Go, Lua, and Swift, offer first-class, anonymous functions with lexical scoping. In most imperative languages...
متن کاملConfessions of a Used Programming Language Salesman Getting the Masses Hooked on Haskell
For many years I had been fruitlessly trying to sell functional programming and Haskell to solve real world problems such as scripting and data-intensive three-tier distributed web applications. The lack of widespread adoption of Haskell is a real pity since functional programming concepts are key to curing many of the headaches that plague the majority of programmers, who today are forced to u...
متن کاملFunctional Programming meets SMIL Animation
Web authors are turning more and more to W3C language standards as powerful yet simple to use authoring tools. These languages are declarative, providing a domain-level description of both content and presentation. When authors need capabilities not provided in the language, they are forced to work in an imperative scripting or programming language, such as ECMAScript or Java. Since most conten...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2015